<include file="public@header"/>
</head>
<body>
<div class="wrap">

    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('banji/banji/index')}">班级列表</a></li>
        <li><a href="{:url('banji/banji/add')}">添加班级</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('banji/banji/index')}">


        班级名字：
        <input class="form-control" type="text" name="name" style="width: 100px;" value="{$name}"
               placeholder="名字">
        <input type="submit" class="btn btn-primary" value="搜索"/>

    </form>
    <table class="table table-hover table-bordered" style="table-layout:fixed;">
        <thead>
        <tr>
            <th>编号</th>
            <th>班级名称</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
            <tr>
                <td>{$vo.id}</td>
                <td>{$vo.name}</td>
                <td>{:date('Y-m-d H:i:s',$vo.create_time)}</td>
                <td>
                    <a class="btn btn-warning" href="{:url('add',array('id'=>$vo['id']))}">编辑</a>
                    <a class="btn btn-danger js-ajax-dialog-btn" href="{:url('delete',array('id'=>$vo['id']))}">删除</a>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
</div>
<link rel="stylesheet" href="__STATIC__/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css">
<script src="__STATIC__/js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/layer-v3.3.0/layer/layer.js"></script>
<script src="__STATIC__/js/pop_layer.js"></script>
<script>
    $("#startDate").datetimepicker({
        format: 'yyyy-mm-dd',
        minView: 'month',
        language: 'zh-CN',
        autoclose: true,
    }).on("click", function () {
        $("#startDate").datetimepicker("setEndDate", $("#endDate").val())
    });
    $("#endDate").datetimepicker({
        format: 'yyyy-mm-dd',
        minView: 'month',
        language: 'zh-CN',
        autoclose: true,
    }).on("click", function () {
        $("#endDate").datetimepicker("setStartDate", $("#startDate").val())
    });
</script>
</body>
</html>